package com.danskin.wechat.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.danskin.wechat.dao.CrmBrandInfoDao;
import com.danskin.wechat.dao.WxMediaPlatformDao;
import com.danskin.wechat.entity.CrmBrandInfo;
import com.danskin.wechat.entity.WxMediaPlatform;
import com.danskin.wechat.entity.example.WxMediaPlatformExample;
import com.danskin.wechat.entity.example.WxMediaPlatformExample.Criteria;
import com.danskin.wechat.service.WxMediaPlatformService;
@Service
public class WxMediaPlatformServiceImpl implements WxMediaPlatformService {
	
	@Autowired
	private WxMediaPlatformDao wxMediaPlatformMapper;

	@Autowired
	private CrmBrandInfoDao brandInfoDao;

	@Override
	public List<WxMediaPlatform> getListWxMediaPlatform(Map<String, Object> map) {
		WxMediaPlatformExample example=new WxMediaPlatformExample();
		Criteria criteria = example.createCriteria();
		
			//criteria.andRegisterOpenIdIsNotNull();
		
		
		List<WxMediaPlatform> list = wxMediaPlatformMapper.selectByExample(example);
		return list;
	}

	@Override
	public WxMediaPlatform getWxMediaPlatformById(int id) {
		WxMediaPlatform wxMediaPlatform = wxMediaPlatformMapper.selectByPrimaryKey(id);
		return wxMediaPlatform;
	}

	@Override
	public WxMediaPlatform getWxMediaPlatformByAppId(String appId) {
		WxMediaPlatform mediaPlatform = wxMediaPlatformMapper.queryByAppId(appId);
		return mediaPlatform;
	}


}
